{% load static %}
{% csrf_token %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="{% static 'tickets/CSS/Manager/replay.css' %}">
    <script src="{% static 'tickets/JS/jquery-3.4.1.js' %}"></script>
</head>
<body>
    <div id="list">
    {% if comt_list %}
        {% for comt in comt_list %}
            <div class="box clearfix">
                <div style="position: absolute ;width:50px;height:150px;font-size:15px;letter-spacing: 5px;">
                    <div style="position: absolute; top: 5%; right: 8%">
                    <img src="{% static 'tickets/images/head/' %}{{ comt.comt_user.user_head }}"
                    style="position: relative; width: 50px; height: 50px; border-radius: 50%">
            </div>
                </div>

                <div class="content" style="margin-left:50px;">
                    <div class="main">
                        <p class="txt">
                            <span class="user">{{ comt.comt_user.user_name }}：</span>
                            {{ comt.comt_text }}
                        </p>
                        <!-- 可以放用户头像 -->
                        <!-- <img class="pic" src="images/img1.jpg" alt=""/> -->
                    </div>
                    <div class="info clearfix">
                        <span class="time">{{ comt.comt_date }}</span>
                    </div>
                    <!-- 这是一个回复的模板，如果要填充的话，需要在JS里面操作，填充到JS的字段中，里面要填充的其实只是管理员的名 -->
                    <div class="comment-list">
                        <!-- <div class="comment-box clearfix" user="self">
                            <div class="comment-content">
                                <p class="comment-text"><span class="user">管理员1：</span>Content</p>
                                <p class="comment-time">
                                    2021-07-06 18:36
                                    <a href="javascript:;" class="comment-operate">删除</a>
                                </p>
                            </div>
                        </div> -->
                    </div>
                    <div class="text-box">
                        <textarea class="comment" 
                            autocomplete="off"
                            id="reply_text_{{ comt.comt_uuid }}">回复…</textarea>
                        
                        <button class="btn" id="{{ comt.comt_uuid }}"onclick="complaint_reply(this)">回 复</button>
                        <span class="word"><span class="length">0</span>/140</span>
                    </div>
                </div>
                <p hidden>{{ comt.comt_uuid }}</p>
                <br/>
            </div>
        {% endfor %}
    {% else %}
        <p>无待处理事项</p>
    {% endif %} 
    </div>   
</body>
<script type="text/javascript" src="{% static 'tickets/JS/Manager/demo.js' %}"></script>
<script type="text/javascript" src="{% static 'tickets/JS/myFunctions.js' %}"></script>
</html>